package com.victor.service;

import java.util.List;

import com.github.pagehelper.PageInfo;
import com.victor.entity.CommentsPhoto;
import com.victor.entity.Infomation;
import com.victor.entity.Personaltravel;
import com.victor.entity.Travel;
import com.victor.entity.TravelCollection;
import com.victor.entity.TravelComments;
import com.victor.entity.TravelFocus;
import com.victor.entity.TravelPraise;
import com.victor.entity.TravelReply;
import com.victor.entity.User;

public interface TravelService {
	/**
	 * 查询游记列表
	 * @param page
	 * @param row
	 * @return
	 */
	PageInfo<Personaltravel> selAll(int page, int row);
	/**
	 * 根据id查询游记
	 * @param id
	 * @return
	 */
	Personaltravel selPersontravelById(Integer id);
	/**
	 * 根据name查询
	 * @param name
	 * @return
	 */
	PageInfo<Personaltravel> selPersontravelByName(String name,int page,int row);
	/**
	 * 删除游记
	 * @param ids
	 * @return
	 */
	boolean delPersontravel(int[] ids);
	/**
	 * 查询评论图片
	 * @param i
	 * @return
	 */
	List<TravelComments> selCommentsphotoByTravelId(int i);
	/**
	 * 根据评论id查询图片
	 * @param i
	 * @return
	 */
	List<CommentsPhoto> selCommentsphotoByTcId(int i);
	/**
	 * 删除评论
	 * @param ids
	 * @return
	 */
	boolean delComments(int[] ids);
	/**
	 * 查询全部
	 * @return
	 */
	List<Personaltravel> selAllNoPage();
	/**
	 * 搜索时间
	 * @param start
	 * @param end
	 * @param page
	 * @param row
	 * @return
	 */
	PageInfo<Personaltravel> selByTime(String start, String end, int page, int row);
	/**
	 * 根据uid查询全部游记
	 * @param page
	 * @param row
	 * @param uid
	 * @return
	 */
	PageInfo<Personaltravel> selAllByUid(int page, int row, String uid);
	/**
	 * 根据uid查询用户
	 * @param page
	 * @param row
	 * @param uid
	 * @return
	 */
	User selUserByUserId(String userid);
	/**
	 * 登陆人查看用户
	 * @param uid
	 * @param userid
	 * @return
	 */
	User selUserByUid(String uid, String userid);
	/**
	 * 没登陆时  查询游记
	 * @param userid
	 * @param page
	 * @param row
	 * @return
	 */
	PageInfo<Personaltravel> selTravelBUserId(String userid, int page, int row);
	/**
	 * 登陆之后  查询游记
	 * @param uid
	 * @param userid
	 * @param page
	 * @param row
	 * @return
	 */
	PageInfo<Personaltravel> selTravelBUid(String uid, String userid, int page, int row);
	/**
	 * 添加游记
	 * @param personaltravel
	 * @return
	 */
	boolean insertTravel(Personaltravel personaltravel);
	/**
	 * 添加图片
	 * @param travel
	 * @return
	 */
	boolean insertPhoto(Travel travel);
	/**
	 * 查询是否关注
	 * @param travelFocus
	 * @return
	 */
	TravelFocus selByUidAndPid(TravelFocus travelFocus);
	/**
	 * 添加关注
	 * @param travelFocus
	 * @return
	 */
	boolean insertFocus(TravelFocus travelFocus);
	/**
	 * 删除关注
	 * @param travelFocus
	 * @return
	 */
	boolean delFocus(Integer id);
	/**
	 * 查询是否点赞游记
	 * @param travelPraise
	 * @return
	 */
	TravelPraise selPraiseByUidAndTravelid(TravelPraise travelPraise);
	/**
	 * 添加点赞游记
	 * @param travelPraise
	 * @return
	 */
	boolean insertPraise(TravelPraise travelPraise);
	/**
	 * 删除游记点赞
	 * @param id
	 * @return
	 */
	boolean delPraise(Integer id);
	/**
	 * 点赞次数
	 * @param travelid
	 * @return
	 */
	String selPraiseCount(String travelid);
	/**
	 * 查询是否收藏
	 * @param collection
	 * @return
	 */
	TravelCollection selCollectionByUidAndTravelid(TravelCollection collection);
	/**
	 * 添加收藏
	 * @param collection
	 * @return
	 */
	boolean insertCollection(TravelCollection collection);
	/**
	 * 删除收藏
	 * @param id
	 * @return
	 */
	boolean delCollection(Integer id);
	/**
	 * 添加评论
	 * @param comments
	 * @return
	 */
	boolean insertComments(TravelComments comments);
	/**
	 * 添加评论图片
	 * @param comments
	 * @return
	 */
	boolean insertCommentsPhoto(CommentsPhoto commentsPhoto);
	/**
	 * 添加回复
	 * @param reply
	 * @return
	 */
	boolean insertReply(TravelReply reply);
	/**
	 * app游记详情
	 * @param travelid
	 * @return
	 */
	Personaltravel selDetailsUp(String travelid);
	/**
	 * 登陆后详情
	 * @param travelid
	 * @param uid
	 * @return
	 */
	Personaltravel selDetailsUpByUid(String travelid, String uid);
	/**
	 * 游记详情的评论
	 * @param travelid
	 * @return
	 */
	PageInfo<TravelComments> selDetailsDown(String travelid,int page,int row);

}
